<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>Caso de Uso</title>
</h:head>
<h:body>

	<ui:composition template="template.xhtml">

		<ui:define name="template_title">
       Manutenção de Caso de Uso/Alterar
      </ui:define>

		<ui:define name="page_content">
			<h:form id="form">
				<p:panel id="display" header="Alterar/Excluir"
					style="margin-top:10px;">

					<p:dataTable var="csu"
						value="#{casoDeUsoBean.listAll}"
						id="csuList" editable="true">

						<p:ajax event="rowEdit" listener="#{casoDeUsoBean.onEdit}" immediate="true"/>
						<p:ajax event="rowEditCancel"
							listener="#{casoDeUsoBeanBean.onCancel}" />

						<p:column headerText="ID" style="width:10%">
							<h:outputText value="#{csu.id}" />
						</p:column>

						<p:column headerText="Nome">
							<p:cellEditor>
								<f:facet name="output">
									<h:outputText value="#{csu.nome}" />
								</f:facet>
								<f:facet name="input">
									<p:inputText value="#{csu.nome}"
										style="width:100%" />
								</f:facet>
							</p:cellEditor>
						</p:column>
                                        <p:column headerText="Descricao">
                            <p:cellEditor>
                                <f:facet name="output">
                                    <h:outputText value="#{csu.descricao}" />
                                </f:facet>
                                <f:facet name="input">
                                    <p:inputText value="#{csu.descricao}"
                                        style="width:100%" />
                                </f:facet>
                            </p:cellEditor>
                        </p:column>
					
						<p:column style="width:6%">
							<p:rowEditor />
						</p:column>
					</p:dataTable>
				</p:panel>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>

</html>